Repository navigation
Closing an account, with 30 days to change your mind - #17
Merged
Merged
Conversation
Closing is closing the organisation: measurement stops for every website at once, nobody in it can open its screens, and everything it holds is kept whole for Organization.ClosureRetention so that an owner can bring it back. After that a sweep deletes its telemetry, its rows, and the people who belonged nowhere else; the last organisation's purge empties the install and the first-run claim stays shut through an installation_claims marker. Where somebody stands prefers an open organisation, so a person who also belongs to an open account is not walled out. A closed organisation is absent from every read and write path except the session, the two closure endpoints, an edition's observers and the sweep. Every owner is written to on closure, a week before deletion, and on restore, with keys that fold in the recipient. ADR 0045 records the decision. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…a closed one An owner closes the account from the Account screen by typing its name. Anybody whose only account is closed lands on one screen wherever they go: it names the account, who closed it and when, when it will be deleted, and offers an owner "Bring it back". Somebody who also belongs to an open account keeps their dashboard and sees one line in the bar about the closed one. Password-reset and invitation links keep working while closed, and joining an open account frees a walled person. The gate decides from session.closure and hasOpenAccount in one pure function. Closing and restoring write the session from the answer and mark everything else read about the account stale; a refusal because somebody else acted a moment earlier settles the cache the same way and re-reads the session. The edition seam gains a closure slot for what an edition has to say about money. ClosureCopyTests holds the "30 days" on the card to the engine's retention. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
… says what closing does Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds the one thing the terms and privacy policy promised that nothing did: an owner can close the account, everything is kept for 30 days so it can be brought back, and then it is deleted. Closes the last "Not started" line of the master plan's Phase 1. ADR 0045 records the decision.
Three commits, each leaving both editions building and every suite green.
The engine (
2315fc5)Organization.ClosureRetention(30 days). Any owner can bring it back; after that a sweep deletes its telemetry, its rows, and the people who belonged nowhere else. The last organisation's purge empties the install, and the first-run claim stays shut through aninstallation_claimsmarker (AddOrganizationClosuremigration, back-filled for every install that already has accounts).OrganizationDirectory.StandingForAsyncprefers an open organisation, so somebody who also belongs to an open account is never walled out;IAccountClosure.DescribeForAsyncsays whether they have anywhere open to be.POST/DELETE /api/organization/closure, 409AccountAlreadyClosed/AccountNotClosed), an edition's observers and the sweep.IAccountClosureObserveris the seam an edition uses for money: called inside the closing and restoring transactions, and last at the purge, so the one irreversible thing is the last thing attempted.The dashboard (
d63c838)destinationFor()decides fromsession.closureandhasOpenAccount; closing and restoring write the session from the answer and mark everything else read about the account stale; a 409 because somebody else acted first settles the cache the same way.EditionModule.closureis the slot an edition fills with what it has to say about money.ClosureCopyTestsholds the "30 days" on the card to the engine's retention.Docs (
fa571c3)Verified locally
Both editions build with zero warnings. Community suites green (Domain 120, Application 289, Architecture 26, Api 14, MailTests 24, Integration incl.
AccountClosureTestsandClosedAccountPurgeTestson real containers).pnpm verifygreen (1,273 dashboard tests). 44 Playwright states of the new screens looked at in light and dark at phone and desktop width; the three emails rendered and read.The private repository's matching change (
closure: ClosurePlanand the hosted service's billing side) builds againstmainonce this is merged; the requiredEditionModule.closuremember means the two land back to back. Production runs the Cloud edition, so this is released together with that change.🤖 Generated with Claude Code